<div class="transbox-new"
     data-rm-locale="{{ remove_locale_url }}"
     data-default="{{ default_locale }}" id="l10n-menu">
  {% set dl = languages[default_locale] %}
  <p>
  {# L10n: {0} is a language name, like 'French' #}
  {% trans %}
    Localize for: <a id="change-locale" href="#">{{ dl }}</a>
  {% endtrans %}
  </p>
  <div id="locale-popup" class="popup hidden">
    <section>
      <b>{{ _('Default Locale') }}</b>
      <div>
        <a class="default-locale" href="#{{ default_locale }}">
        {% trans title=dl, lang=default_locale %}
        {{ title }} <em>&middot; {{ lang }}</em>
        {% endtrans %}
      </a></div>
      <b>{{ _('Existing Locales') }}</b>
      <ul id="existing_locales">
      </ul>
      <b>{{ _('New Locales') }}</b>
      <ul id="all_locales">
        {% for lang, title in languages|dictsort %}
          {% if lang != default_locale %}
            <li>
            <a href="#{{ lang }}">
              {% trans title=title, lang=lang %}
              {{ title }} <em>&middot; {{ lang }}</em>
              {% endtrans %}
            </a>
            </li>
          {% endif %}
        {% endfor %}
      </ul>
    </section>
  </div>
  <div id="modal-l10n-unsaved" class="modal hidden">
    <p class="msg">
    {# L10n: {0} is a language name, like 'French' #}
    {% trans %}
      You have unsaved changes in the <b>{0}</b> locale.
      Would you like to save your changes before switching locales?
    {% endtrans %}
    </p>
    <p class="modal-actions">
      <button id="l10n-save-changes" class="button">{{ _('Save Changes') }}</button>
      <button id="l10n-discard-changes" class="button">{{ _('Discard Changes') }}</button>
      {{ _('or') }} <a id="l10n-cancel-changes" href="#">{{ _('Cancel') }}</a>
    </p>
  </div>
  <div id="modal-l10n-rm" class="modal hidden">
    <p class="msg">
    {# L10n: {0} is a language name, like 'French' #}
    {% trans %}
      Are you sure you want to remove all <b>{0}</b> translations? This cannot be undone.
    {% endtrans %}
    </p>
    <p class="listing-footer modal-actions">
      <button id="l10n-confirm-rm" class="button">{{ _('Delete Locale') }}</button>
      {{ _('or') }} <a id="l10n-cancel-rm" href="#">{{ _('Cancel') }}</a>
    </p>
  </div>
</div>
